# coding=UTF-8
import time
import datetime
from datetime import datetime
################################################################################
# xml element variable define
def _init():
    global command_id
    command_id='10002000300040000000'
    global now_time_str
    now_time_str = datetime.now().replace(microsecond=0).strftime("%Y-%m-%d %H:%M:%S")
    global beg_time_str
    beg_time_str = datetime.now().replace(hour=0,minute=0,second=0,microsecond=0).strftime("%Y-%m-%d %H:%M:%S")
    global end_time_str
    end_time_str = datetime.now().replace(month=12, day=31, hour=23, minute=59, second = 59, microsecond=0).strftime("%Y-%m-%d %H:%M:%S")

    global cmd_type_table
    cmd_type_table = [
        ['01',      'commandType' , 'iot_evil_payload',     'IOT恶意报文指令'],
        ['02',      'commandType' , 'iot_evil_file',        'IOT恶意文件指令'],
        ['03',      'commandType' , 'iot_data_select',      'IOT流量筛查指令'],
        ['0101',    'commandType' , 'jmr_evil_resource',    'JMR恶意资源指令'],
        ['0102',    'commandType' , 'jmr_evil_payload',     'JMR恶意报文指令'],
        ['0103',    'commandType' , 'jmr_evil_file',        'JMR恶意文件指令'],
        ['0201',    'commandType' , 'jmr_dispose',          'JMR处置指令'],
    ]
